package pro.softzhang.algo.lc400;

import pro.softzhang.algo.flag.knowledge.KBitManipulation;

@KBitManipulation
public class LC461_HammingDistance {
    public static void main(String[] args) {

    }

    /**
     *
     */
    static
    class Solution {
        public int hammingDistance(int x, int y) {
            int r = x ^ y, d = 0;
            while (r != 0) {
                d += r & 1;
                r >>= 1;
            }
            return d;
        }
    }
}
